package cn.kgm.generator.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @kapi #技术改变自己#
 * @AUTHOR: ruoyi
 * @EMAIL: yolo.jk@qq.com
 * @DATE: 2023/6/7 0:25周三
 * @PACKAGE: io.renren.config.CORSConfiguration
 */
@Configuration
public class CORSConfiguration extends WebMvcConfigurerAdapter {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedMethods("*")
                .allowedOrigins("*")
                .allowedHeaders("*");
    }
}
